package jp.sourceforge.akjrcp.ui;

import org.eclipse.swt.layout.GridData;
/**
 * moved use commons
 * @deprected 
 * @author aki
 *
 */
/**
 * @deprecated
 */
public class LayoutDataBuilder {
public static GridData fillHorizontalGridData(){
	return new GridData(GridData.FILL_HORIZONTAL);
}
public static GridData fillBothGridData(){
	return new GridData(GridData.FILL_BOTH);
}
public static GridData fillverticalGridData(){
	return new GridData(GridData.FILL_VERTICAL);
}

public static GridData hintGridData(int width,int height){
	int layout=0;
	if(width==-1&&height==-1){
		layout=GridData.FILL_BOTH;
	}else if(width==-1){
		layout=GridData.FILL_HORIZONTAL;
	}else if(height==-1){
		layout=GridData.FILL_VERTICAL;
	}
	GridData data=new GridData(layout);
	if(width>0)
	data.widthHint=width;
	if(height>0)
	data.heightHint=height;
	
	return data;
}
}
